import React, {Component} from 'react';
import {Image, Center} from 'native-base';
import {Platform} from 'react-native';

class ImgShow extends Component {
  constructor(props) {
    super(props);
    console.log('params=', props.route.params);
  }
  render() {
    return (
      <Center>
        <Image
          source={{
            uri:
              Platform.OS === 'android' ||
              (Platform.Os === 'iOS' && Platform.Version > 14)
                ? `${this.props.route.params.img1}?imageView2/0/format/webp/interlace/1/q/1`
                : `${this.props.route.params.img1}`,
          }}
          fallbackSource={require('../../assets/error.webp')}
          alt="123"
          size="2xl"
          resizeMethod="resize"
        />
        <Image
          source={{
            uri:
              Platform.OS === 'android' ||
              (Platform.Os === 'iOS' && Platform.Version > 14)
                ? `${this.props.route.params.img2}?imageView2/0/format/webp/interlace/1/q/1`
                : `${this.props.route.params.img2}`,
          }}
          fallbackSource={require('../../assets/error.webp')}
          alt="123"
          size="2xl"
          resizeMethod="resize"
        />
      </Center>
    );
  }
}

export default ImgShow;
